<template>
        <!-- <el-table-column v-if="type==='index'" :prop="prop" type="index" header-align="center"
            align="center">
        </el-table-column>

        <el-table-column v-if="type==='selection'" type="selection" width="55" header-align="center"
            align="center">
        </el-table-column>  -->

        <el-table-column :prop="prop" :label="label" header-align="center" align="center"
            :width="width" :show-overflow-tooltip="tip" :fixed="fixed" :key="prop">
            <template slot-scope="scope">
                <!-- 默认显示字段值 -->
                <slot :row="scope.row">
                    <span :class="isColor ? 'textColor' : ''">{{scope.row[prop]}}</span>
                </slot>
            </template>
        </el-table-column>

        <!-- name 是命名插槽 row 对应父组件中参数属性名 socpe.row 独赢父组件中参数的值 不能为socpe 因为无含义无参数 -->
        <!-- <el-table-column v-if="type == 'operation'" :prop="prop" :label="label" header-align="center" align="center"
            :width="width" :show-overflow-tooltip="tip" :fixed="fixed">
            <template slot-scope="scope">
                <slot :row="scope.row" v-if="type == 'operation'">
                </slot>
            </template>
        </el-table-column> -->
</template>
<script>
    export default {
        props: {
            prop: {
                type: String,
                default: ""
            },
            label: {
                type: String,
                default: ""
            },
            type: {
                type: String,
                default: ""
            },
            fixed: {
                "parent-msg": [String, Boolean],
                default: false
            },
            callbackprop: {
                type: String,
                default: ""
            },
            width: {
                type: String,
                default: "200"
            },
            isColor: {
                type: Boolean,
                default: false
            },
            tip: {
                type: Boolean,
                default: true
            }
        },
        data() {
            return {}
        },
        methods: {
            click(v) {
                this.$emit('click', v)
            }
        }
    }
</script>
<style scoped>
    .textColor {
        color: #409EFF;
        cursor: pointer;
    }
</style>